import request from '@/utils/request'

// 新建菜单
export function CMenu(params = {}) {
  return request({
    url: '/api/v1/sys/menu',
    method: 'post',
    params
  })
}

// 更新菜单
export function UMenu(params = {}) {
  return request({
    url: '/api/v1/sys/menu',
    method: 'put',
    params
  })
}

// 删除菜单
export function DMenu(params = {}) {
  return request({
    url: '/api/v1/sys/menu',
    method: 'delete',
    params
  })
}

// 获取菜单
export function RMenuList(params = {}) {
  return request({
    // url: '/api/v1/sys/menu/list',
    url: '/api/v1/sys/menu/list/all',
    method: 'get',
    params
  })
}

// 菜单排序
export function menuSort(params = {}) {
  return request({
    url: '/api/v1/sys/menu/move',
    method: 'post',
    params
  })
}
